#pragma once

#include "SPGame/SPDeathMatch.h"

class SPGameRoot
{
	friend SPGameRoot* SPGGetRoot();
public:

	void Create( HWND hWnd, UINT width, UINT height );
	void SetWindow( UINT width, UINT height );

	//void SetBackgroundColour();

	void OnFrame();

	void NewEmitter();
	bool IsFrameFinish(){ return m_bFrameFinished; }

	void SetPause( bool pause ){ m_bPause = pause; }

	HWND GetHWND(){ return m_hWnd; }

	void SetSize( UINT width, UINT height )
	{
		m_nNewWidth = width;
		m_nNewHeight = height;
	}
private:	 
	SPGameRoot();
	~SPGameRoot();

	SP::SPWorld* m_pWorld;

	HWND m_hWnd;

	UINT m_nNewWidth;
	UINT m_nNewHeight;
	UINT m_nOldWidth;
	UINT m_nOldHeight;

	bool m_bPause;
	bool m_bFrameFinished;
};

SPGameRoot* SPGGetRoot();